<template>
  <div class="operate-log-dialog">
    <MyDialog
      :show="isLogShow"
      customName="operate-log-dialog"
      dialogWidth="750px"
      @beforeClose="beforeClose"
    >
      <template #body>
        <el-table :data="logList" style="width: 100%" size="mini" height="200">
          <el-table-column prop="timestamp" label="操作时间" width="180">
          </el-table-column>
          <el-table-column prop="remark" label="操作明细" >
          </el-table-column>
          <el-table-column prop="operator" label="操作人" >
            <template slot-scope="scope">
              <span>{{ scope.row.operator }}</span>
            </template>
          </el-table-column>
        </el-table>
      </template>
      <div slot="title">
        <div class="dialog-title">操作记录</div>
      </div>
      <div slot="footer"></div>
    </MyDialog>
  </div>
</template>

<script>
export default {
  name: "OperateLog",
  props: {
    isLogShow: {
      type: Boolean,
      default: false,
    },
    logList: {
      type: Array,
      default: () => [],
    },
  },
  components: {},
  watch: {
    isLogShow() {},
  },
  data() {
    return {};
  },

  methods: {
    // 关闭回库窗口
    beforeClose() {
      this.$emit("closeApplyDialog");
    },
    // 取消按钮 - 关闭表单
    applyClose() {
      this.$emit("closeApplyDialog");
    },
  },
};
</script>

<style lang="scss" scoped>
.operate-log-dialog {
  .dialog-title {
    color: #f88123;
    font-size: 16px;
  }
}
</style>
